<?php
class SystemException extends Exception{    
    /**
     * Constants for type
     */
	const OS_ERROR = '900';
	const IO_ERROR = '1000';
    const PHP_ERROR = '100';
	const FRAMEWORK_ERROR = '200';
	const CACHE_ERROR = '300';
	const DB_ERROR = '400';
	const DAO_ERROR = '500';
	const RUNTIME_ERROR = '2000';

	
	public $type;
	public $message;
	
	/** 
	 * Exception ID, default value: 1000
	 * If there is a sub class of this class, the value of it will be 1X000, e.g.:
	 * class DAOException extends SystemException{
	 *  ...
	 *  public $id; //   $id = 1500
	 *  ...
	 * } 
	 */
	public $id;  

	public function SystemException($type, $message, $id=1000) {
		$this->type = $type;
		$this->message = $message;
		$this->id = $id;
	}
}
